<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 日期获取方法 </title>
</head>
<body>
<h2>getMinutes() 方法</h2>
<p>以数字（0-59）返回日期的分钟数：</p>

<p id="demo"></p>

<script>
  var d = new Date();
  document.getElementById("demo").innerHTML = d.getMinutes();
</script>
</body>
</html>